import request from "@/utils/request"
const BASE_URL = process.env.VUE_APP_BASE_URL_OA
const BASE_URL_ADMIN = process.env.VUE_APP_BASE_URL

/**
 * 新增日程
 *
 */
export function canlendarSaveAPI(data) {
	return request({
		url: BASE_URL + "oaEvent/save",
		method: "post",
		headers: {
			"Content-Type": "application/json;charset=UTF-8"
		},
		data: data
	})
}

/**
 * 删除日程
 *
 */
export function canlendarDeleteAPI(data) {
	return request({
		url: BASE_URL + "oaEvent/delete",
		method: "post",
		headers: {
			"Content-Type": "application/json;charset=UTF-8"
		},
		data: data
	})
}

/**
 * 查询日程
 *
 */
export function canlendarQueryListAPI(data) {
	return request({
		url: BASE_URL + "oaEvent/queryList",
		method: "post",
		headers: {
			"Content-Type": "application/json;charset=UTF-8"
		},
		data: data
	})
}

/**
 * 编辑日程 oaEvent/queryById
 *
 */
export function canlendarUpdateAPI(data) {
	return request({
		url: BASE_URL + "oaEvent/update",
		method: "post",
		headers: {
			"Content-Type": "application/json;charset=UTF-8"
		},
		data: data
	})
}

/**
 * 查询日程详情
 *
 */
export function canlendarQueryByIdAPI(data) {
	return request({
		url: BASE_URL + "oaEvent/queryById",
		method: "post",
		headers: {
			"Content-Type": "application/json;charset=UTF-8"
		},
		data: data
	})
}

/**
 * 查询自定义列表
 */
export function canlendarQueryTypeListAPI(data) {
	return request({
		url: BASE_URL + "oaCalendar/queryTypeListByUser",
		method: "post",
		data: data
	})
}

/**
 * 编辑自定义列表 oaCalendar/todayTask
 */
export function canlendarUpdateTypeAPI(data) {
	return request({
		url: BASE_URL + "oaCalendar/updateTypeUser",
		method: "post",
		headers: {
			"Content-Type": "application/json;charset=UTF-8"
		},
		data: data
	})
}

// /**
//  * 今日需联系任务
//  */
// export function canlendarTodayTaskAPI(data) {
//   return request({
//     url: BASE_URL + 'oaCalendar/todayTask',
//     method: 'post',
//     headers: {
//       'Content-Type': 'application/json;charset=UTF-8'
//     },
//     data: data
//   })
// }

/**
 * 今日到期的合同（type: 1 当日到期合同 2 当日回款合同）
 */
export function canlendarTodayContractAPI(data) {
	return request({
		url: BASE_URL + "oaCalendar/eventContract",
		method: "post",
		headers: {
			"Content-Type": "application/json;charset=UTF-8"
		},
		data: data
	})
}

/**
 * 需联系客户
 */
export function canlendarTodayCustomerAPI(data) {
	return request({
		url: BASE_URL + "oaCalendar/eventCustomer",
		method: "post",
		headers: {
			"Content-Type": "application/json;charset=UTF-8"
		},
		data: data
	})
}

/**
 * 需联系线索
 */
export function canlendarTodayLeadsAPI(data) {
	return request({
		url: BASE_URL + "oaCalendar/eventLeads",
		method: "post",
		headers: {
			"Content-Type": "application/json;charset=UTF-8"
		},
		data: data
	})
}

/**
 * 需联系商机
 */
export function canlendarTodayBusinessAPI(data) {
	return request({
		url: BASE_URL + "oaCalendar/eventBusiness",
		method: "post",
		headers: {
			"Content-Type": "application/json;charset=UTF-8"
		},
		data: data
	})
}

/**
 * 预计成交商机
 */
export function canlendarTodayDealBusinessAPI(data) {
	return request({
		url: BASE_URL + "oaCalendar/eventDealBusiness",
		method: "post",
		headers: {
			"Content-Type": "application/json;charset=UTF-8"
		},
		data: data
	})
}

/**
 * 小日历标记
 */
export function canlendarQueryListStatusAPI(data) {
	return request({
		url: BASE_URL + "oaEvent/queryListStatus",
		method: "post",
		headers: {
			"Content-Type": "application/json;charset=UTF-8"
		},
		data: data
	})
}

/**
 * 今日crm状态提醒
 */
export function canlendarEventCrmAPI(data) {
	return request({
		url: BASE_URL + "oaCalendar/eventCrm",
		method: "post",
		headers: {
			"Content-Type": "application/json;charset=UTF-8"
		},
		data: data
	})
}

/**
 * 即将到期的任务
 */
export function canlendarEventTaskAPI(data) {
	return request({
		url: BASE_URL + "oaCalendar/eventTask",
		method: "post",
		headers: {
			"Content-Type": "application/json;charset=UTF-8"
		},
		data: data
	})
}

/**
 *  日程员工列表
 */
export function systemUserQueryAuthUserList(data) {
	return request({
		url: BASE_URL_ADMIN + "adminUser/queryAuthUserList",
		method: "post",
		data: data
	})
}
